namespace DataType { // typescript基本类型有：nubmer string boolean enum 数组 元组 void null undefined never any
    let num: number = 1;
    console.log('num: ', num);
    let str: string = "string";
    console.log('str: ', str);
    let bool: boolean = true;
    console.log('bool: ', bool);
    // enum表示枚举
    enum Color {
        Red,
        Blue,
        White,
        Black
    }
    let enumVal: Color = Color.Black;
    console.log('enumVal: ', enumVal);
    let arr: number[] = [0, 1];
    arr.push(2)
    console.log('arr: ', arr);
    let tup: [string, number];
    tup = ['arr', 2];
    console.log('tup: ', tup);
    // void用来表示函数无返回值类型；
    function hello(): void {
        console.log("Hello Runoob");
    } hello()

    // 类型断言
    const inputEle: HTMLElement = document.querySelector("#input")!;
    // const value = inputEle.value
    const value = (inputEle as HTMLInputElement).value;
    const val = (< HTMLInputElement > inputEle).value
    console.log('val: ', val);

}
